package org.club.common.model.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.club.common.model.entity.ClubInfo;



import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ClubInfoVO {
    private Long id;//主键
    private String name;//社团名称
    /**
     * 描述: 社团描述
     */
    private String description;

    /**
     *  封面图片的URL地址
     */
    private String coverUrl;

    /**
     * 社团状态（0:审核中，1:已通过，2:已拒绝）
     */
    private Integer status;

    /**
     * 创建时间
     */
    private LocalDateTime createdAt;
    //管理员姓名
    private String adminName;
    //管理员账户
    private String adminAccount;
    //社团活动状态
    private String clubActivitiesStatus;
    //有参构造
    public ClubInfoVO(ClubInfo clubInfo) {
        if (clubInfo != null){
            this.id = clubInfo.getId();
            this.name = clubInfo.getName();
            this.description = clubInfo.getDescription();
            this.coverUrl = clubInfo.getCoverUrl();
            this.status = clubInfo.getStatus();
            this.createdAt = clubInfo.getCreatedAt();
            this.adminName = clubInfo.getAdminName();
            this.adminAccount = clubInfo.getAdminAccount();
            this.clubActivitiesStatus = clubInfo.getClubActivitiesStatus();
        }

    }
}
